package cn.com.surker.material.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 材料库存记录
 * </p>
 *
 * @author admin
 * @since 2023-11-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MaterialStore implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 材料信息
     */
    private Long materialId;

    /**
     * 材料名称
     */
    private String material;

    /**
     * 公司ID
     */
    private Long orgId;
    /**
     * 公司名
     */
    private String orgName;
    /**
     * 数量
     */
    private Double num;

    /**
     * 单位
     */
    private String unit;

    /**
     * 状态(0:启用1:禁用)
     */
    private Integer status;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 创建人员
     */
    private Long creater;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 修改人员
     */
    private Long updater;

    /**
     * 备注
     */
    private String remarks;

    public MaterialStore(){}
    public MaterialStore(Long orgId, String orgName,Long materialId, String material, Double num, String unit, Integer status, Date createTime, Long creater, Date updateTime, Long updater, String remarks) {
        this.orgId = orgId;
    	this.materialId = materialId;
    	this.orgName = orgName;
        this.material = material;
        this.num = num;
        this.unit = unit;
        this.status = status;
        this.createTime = createTime;
        this.creater = creater;
        this.updateTime = updateTime;
        this.updater = updater;
        this.remarks = remarks;
    }
}
